<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>首页</title>
<link href="../static/css/amazeui.css" rel="stylesheet" type="text/css" />
<link href="../static/css/admin.css" rel="stylesheet" type="text/css" />
<link href="../static/css/demo.css" rel="stylesheet" type="text/css" />
<link href="../static/css/hmstyle.css" rel="stylesheet" type="text/css"/>
<link href="../static/css/skin.css" rel="stylesheet" type="text/css" />
<script src="../static/js/jquery-2.0.0.min.js"></script>
<script src="../static/js/amazeui.min.js"></script>
<script src="../static/js/myinit.js"></script>

</head>

<body>
<div class="hmtop"> 
  <!--顶部导航条 -->
  <div class="am-container header">
    <ul class="message-l">
      <div class="topMessage">
        <div class="menu-hd"> <a href="#" target="_top" class="h">亲，请登录</a> <a href="#" target="_top">免费注册</a> </div>
      </div>
    </ul>
    <ul class="message-r">
      <div class="topMessage home">
        <div class="menu-hd"><a href="#" target="_top" class="h">商城首页</a></div>
      </div>
      <div class="topMessage my-shangcheng">
        <div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
      </div>
      <div class="topMessage mini-cart">
        <div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
      </div>
      <div class="topMessage favorite">
        <div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
      </div>
    </ul>
  </div>
  
  <!--悬浮搜索框-->
  
  <div class="nav white">
    <div class="logo"><img src="../static/img/logo.png" /></div>
    <div class="logoBig">
      <li><img src="../static/img/TianLoGo.png" /></li>
    </div>
    <div class="search-bar pr"> <a name="index_none_header_sysc" href="#"></a>
      <form>
        <input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
        <input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
      </form>
    </div>
  </div>
  <div class="clear"></div>
</div>
<div class="banner"> 
  <!--轮播 -->
  <div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
    <ul class="am-slides">
      <li class="banner1"><a href="introduction.html"><img src="../static/img/ad1.jpg" /></a></li>
      <li class="banner2"><a><img src="../static/img/ad2.jpg" /></a></li>
      <li class="banner3"><a><img src="../static/img/ad3.jpg" /></a></li>
      <li class="banner4"><a><img src="../static/img/ad4.jpg" /></a></li>
    </ul>
  </div>
  <div class="clear"></div>
</div>
<div class="shopNav">
  <div class="slideall">
    <div class="long-title" id="FenLei_PC"><span class="all-goods">全部分类</span></div>
    <div class="nav-cont">
      <ul>
        <li class="index"><a href="#">首页</a></li>
        <li class="qc"><a href="#">闪购</a></li>
        <li class="qc"><a href="#">限时抢</a></li>
        <li class="qc"><a href="#">团购</a></li>
        <li class="qc last"><a href="#">大包装</a></li>
      </ul>
      <div class="nav-extra"> <i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的优惠券<i class="am-icon-angle-right" style="padding-left: 10px;"></i> </div>
    </div>
    
    <!--侧边导航 -->
    <div id="nav" class="navfull">
      <div class="area clearfix">
        <div class="category-content" id="guide_2">
          <div class="category">
            <ul class="category-list" id="js_climit_li" style="display:none">

            </ul>
          </div>
        </div>
      </div>
    </div>
    
    <!--轮播--> 
    
    <script type="text/javascript">
							(function() {
								$('.am-slider').flexslider();
							});
							$(document).ready(function() {
								$("li").hover(function() {
									$(".category-content .category-list li.first .menu-in").css("display", "none");
									$(".category-content .category-list li.first").removeClass("hover");
									$(this).addClass("hover");
									$(this).children("div.menu-in").css("display", "block")
								}, function() {
									$(this).removeClass("hover")
									$(this).children("div.menu-in").css("display", "none")
								});
							})
						</script> 
    
    <!--小导航 -->
    <div class="am-g am-g-fixed smallnav">
      <div class="am-u-sm-3"> <a href="sort.html"><img src="../static/img/navsmall.jpg" />
        <div class="title">商品分类</div>
        </a> </div>
      <div class="am-u-sm-3"> <a href="#"><img src="../static/img/huismall.jpg" />
        <div class="title">大聚惠</div>
        </a> </div>
      <div class="am-u-sm-3"> <a href="#"><img src="../static/img/mansmall.jpg" />
        <div class="title">个人中心</div>
        </a> </div>
      <div class="am-u-sm-3"> <a href="#"><img src="../static/img/moneysmall.jpg" />
        <div class="title">投资理财</div>
        </a> </div>
    </div>
    
    <!--走马灯 -->
    
    <div class="clear"></div>
  </div>
  <script type="text/javascript">
					if ($(window).width() < 640) {
						function autoScroll(obj) {
							$(obj).find("ul").animate({
								marginTop: "-39px"
							}, 500, function() {
								$(this).css({
									marginTop: "0px"
								}).find("li:first").appendTo(this);
							})
						}
						$(function() {
							setInterval('autoScroll(".demo")', 3000);
						})
					}
				</script> 
</div>
<!--
<div class="shopMainbg">
  <div class="shopMain" id="shopmain"> 
    
    <!--今日推荐
    
    <div class="am-g am-g-fixed recommendation">
      <div class="clock am-u-sm-3"> <img src="../static/img/2016.png "></img>
        <p>今日<br>
          推荐</p>
      </div>
      <div class="am-u-sm-4 am-u-lg-3 ">
        <div class="info ">
          <h3>真的有鱼</h3>
          <h4>开年福利篇</h4>
        </div>
        <div class="recommendationMain one"> <a href="introduction.html"><img src="../static/img/tj.png "></img></a> </div>
      </div>
      <div class="am-u-sm-4 am-u-lg-3 ">
        <div class="info ">
          <h3>囤货过冬</h3>
          <h4>让爱早回家</h4>
        </div>
        <div class="recommendationMain two"> <img src="../static/img/tj1.png "></img> </div>
      </div>
      <div class="am-u-sm-4 am-u-lg-3 ">
        <div class="info ">
          <h3>浪漫情人节</h3>
          <h4>甜甜蜜蜜</h4>
        </div>
        <div class="recommendationMain three"> <img src="../static/img/tj2.png "></img> </div>
      </div>
    </div>
    <div class="clear "></div>
    <!--热门活动 -->
     <!-- -->
    <div id="cuxiao">
        <div id="f1">
          <div class="am-g am-g-fixed floodFour">
            <div id="ssjg"></div>
          </div>
        </div>
    </div>


    <div class="footer ">
      <div class="footer-hd">
        <p><img src="../static/img/duo.png" style="width:25px" />品类齐全<b>|</b><img src="../static/img/kuai.png" style="width:25px" />多仓直发<b>|</b><img src="../static/img/hao.png" style="width:25px" />正品行货<b>|</b><img src="../static/img/sheng.png" style="width:25px" />天天低价</p>
      </div>
      <div class="footer-bd "> </div>
    </div>
  </div>
</div>
<!--引导 -->
<div class="navCir">
  <li class="active"><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
  <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
  <li><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>
  <li><a href="person/index.html"><i class="am-icon-user"></i>我的</a></li>
</div>

<!--菜单 -->
<div class=tip>
  <div id="sidebar">
    <div id="wrap">
      <div id="prof" class="item "> <a href="# "> <span class="setting "></span> </a>
        <div class="ibar_login_box status_login ">
          <div class="avatar_box ">
            <p class="avatar_imgbox "><img src="../static/img/no-img_mid_.jpg " /></p>
            <ul class="user_info ">
              <li>用户名sl1903</li>
              <li>级&nbsp;别普通会员</li>
            </ul>
          </div>
          <div class="login_btnbox "> <a href="# " class="login_order ">我的订单</a> <a href="# " class="login_favorite ">我的收藏</a> </div>
          <i class="icon_arrow_white "></i> </div>
      </div>
      <div id="shopCart " class="item "> <a href="# "> <span class="message "></span> </a>
        <p> 购物车 </p>
        <p class="cart_num ">0</p>
      </div>
      <div id="brand " class="item "> <a href="#"> <span class="wdsc "><img src="../static/img/wdsc.png " /></span> </a>
        <div class="mp_tooltip "> 我的收藏 <i class="icon_arrow_right_black "></i> </div>
      </div>
      <div id="broadcast " class="item "> <a href="# "> <span class="chongzhi "><img src="../static/img/chongzhi.png " /></span> </a>
        <div class="mp_tooltip "> 我的充值 <i class="icon_arrow_right_black "></i> </div>
      </div>
      <div class="quick_toggle ">
        <li class="qtitem "> <a href="# "><span class="kfzx "></span></a>
          <div class="mp_tooltip ">客服在线<i class="icon_arrow_right_black "></i></div>
        </li>
        <!--二维码 -->
        <li class="qtitem "> <a href="#none "><span class="mpbtn_qrcode "></span></a>
          <div class="mp_qrcode " style="display:none; "><img src="../static/img/weixin_code_145.png " /><i class="icon_arrow_white "></i></div>
        </li>
        <li class="qtitem "> <a href="#top " class="return_top "><span class="top "></span></a> </li>
      </div>
      
      <!--回到顶部 -->
      <div id="quick_links_pop " class="quick_links_pop hide "></div>
    </div>
  </div>
</div>
<script>
			window.jQuery || document.write('<script src="../static/js/jquery.min.js "><\/script>');
		</script> 
<script type="text/javascript " src="../static/js/quick_links.js "></script>
<script type="text/javascript">
ajaxSettingsasync(true);
$(document).ready(function(){
	initcagatory();
	cuxiaoall();
});
$('#ai-topsearch').click(function(e) {
	var htm=$('#searchInput').val();
	if(htm!=''){
		document.location.href="search_pc.html?OPENID="+openid+"&KEYWORD="+htm;
	}
});
$('#FenLei_PC').click(function(){$('#js_climit_li').toggle();});
//获取商品分类
function initcagatory(){
	var url = "/webserver/api/v1/catagory/?format=json";
	$.getJSON(url,function(rs){
		var objects=rs.objects;
		$.each(objects,function(index,item){
			$('#js_climit_li').append('<li id="'+item.id+'" class="appliance js_toggle relative first"><div class="category-info"><h3 class="category-name b-category-name"><a class="ml-22">'+item.name+'</a></h3><em>&gt;</em></div><b class="arrow"></b> </li>');
		});
		
		 
		$('#js_climit_li li').click(function(e) {
			var id = $(this).attr('id');
			 
			window.location.href="Listshangping_pc.html?CAGAID="+id;
		});
		
		/* 
		if($('#js_climit_li').hasClass('mypannelshow')){
			$('#js_climit_li').removeClass('mypannelshow');
			$('#js_climit_li').addClass('mypannelhide');
		}else{
			$('#js_climit_li').addClass('mypannelshow');
			$('#js_climit_li').removeClass('mypannelhide');
	
		}
		$('#js_climit_li').show();8*/
	});
}

//获取所有的促销
function cuxiaoall(){
	var url = "/webserver/api/v1/saleinfo/?format=json";
	$.getJSON(url,function(rs){
		var objects = rs.objects;

		$.each(objects,function(index,item){
			
			var str = item.salename;
			var indexofblank=str.indexOf(' ');
			 
			var eng=str.substr(indexofblank+1);
			
			var chn=str.substr(0,indexofblank);
			$('#cuxiao').append('<div id="'+item.id+'" class="mycuxiao"><div class="am-container "><div class="shopTitle "><h4>'+chn+'</h4><h3>'+eng+'</h3>  </div></div><div class="am-g am-g-fixed floodFour"></div><div class="clear "></div></div>');
			
			 
			initAcuxiao(item.id);
		});
		
	});
	
}

function initAcuxiao(cxid){
	var ww=$(document).innerWidth();
	var url = "/webserver/api/v1/good/?format=json&saleinfo="+cxid;
	$.getJSON(url,function(rs){
		var objects = rs.objects;
		 
		$.each(objects,function(index,item){
			var clas="big";
			 
			$('.mycuxiao#'+cxid+' .floodFour').append('<div class="am-u-sm-7 am-u-md-4 text-two '+clas+'" id="'+item.id+'"><div class="outer-con "><div class="title "> '+item.name+' </div><div class="sub-title "> ¥'+item.price+' </div><i class="am-icon-shopping-basket am-icon-md  seprate"></i> </div><a  ><img src="'+item.image_thumb+'"/></a> </div></div>'
			);
		});
		$('.mycuxiao#'+cxid+' .floodFour').find('.am-u-sm-7').click(function(e) {
			var id = $(this).attr('id');
			document.location.href="introduction_pc.html?GOODID="+id;
		});
	});

}
</script>
</body>
</html>